package com.example.knowman.ObService.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.knowman.ObService.OBarchLabelDetailService;
import com.example.knowman.ObService.OBknowLabelDetailService;
import com.example.knowman.entity.archLabelDetail;
import com.example.knowman.entity.knowLabelDetail;
import com.example.knowman.mapper.ArchLabelDetailMapper;
import com.example.knowman.mapper.KnowLabelDetailMapper;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ObArchLabelDetailServiceImpl extends ServiceImpl<ArchLabelDetailMapper, archLabelDetail> implements OBarchLabelDetailService {




    @Override
    public void deleteByarchLblId(Integer archLblId) {
        QueryWrapper<archLabelDetail> wrapper = new QueryWrapper<>();
        wrapper.eq("\"archLblId\"",archLblId);
        try{
            this.remove(wrapper);
        }catch (Exception e){

        }
    }

    @Override
    public Integer backByarchLblId(Integer archLblId) {
        return this.lambdaQuery().select().eq(archLabelDetail::getArchLblId,archLblId).count();
    }
}
